<template>
    <el-row style="margin: 20px 0;" align="middle">
        <el-col :span="3" class="lei"><strong>纸品类</strong></el-col>
        <el-col :span="20">
            <div class="mt-4">
                <el-input v-model="jiage.paperPrice" style="max-width: 600px" placeholder="请输入价格">
                    <template #append>元/斤</template>
                </el-input>
            </div>
        </el-col>
    </el-row>
    <el-row align="middle">
        <el-col :span="3" class="lei"><strong>塑料瓶类</strong></el-col>
        <el-col :span="20">
            <div class="mt-4">
                <el-input v-model="jiage.plasticPrice" style="max-width: 600px" placeholder="请输入价格">
                    <template #append>元/个</template>
                </el-input>
            </div>
        </el-col>
    </el-row>
    <el-row  class="col" style="margin: 20px 0;">
        <el-col :span="3" style="margin-right: 5px;"></el-col>
        <el-col :span="4">
            <el-button type="primary" @click="save">修改</el-button></el-col>
        <el-col :span="3">
            <el-button type="default" @click="cancle">取消</el-button></el-col>
    </el-row>
</template>

<script setup>
import axios from 'axios';
import { defineEmits,defineProps,ref } from 'vue';
const emits = defineEmits(["operate"]);
let props = defineProps({
    data:{
        type:Object
    }
});
let jiage = ref({...props.data})





const cancle = function () {
emits("operate")
}

const save =async function () {
await axios.post("http://43.143.190.87:8091/panghudaojiaBackend/recycleOrder/updateRecyclePrice",jiage.value) 
    emits("operate")
}

</script>

<style lang="less" scoped>
.lei {
    text-align: right;
    margin-right: 5px;
}

// input {
//     display: flex;
//     justify-content: flex-start;
//     /* 左对齐 */
//     align-items: center;
//     /* 垂直居中 */
//     height: 100vh;
//     /* 容器高度设置为视窗高度 */

// }
</style>